<?php

namespace Mlym\CodeGeneration\Middleware\Bean\Module;

use EasySwoole\Spl\SplBean;

class RelationBean extends SplBean
{
    protected $name;
    protected $alias;
    protected $join_type;
    protected $condition;

    protected function initialize(): void
    {

    }

    /**
     * @return mixed
     */
    public function getName()
    {
        return $this->name;
    }

    /**
     * @param mixed $name
     */
    public function setName($name): void
    {
        $this->name = $name;
    }

    /**
     * @return mixed
     */
    public function getAlias()
    {
        return $this->alias ?? $this->name;
    }

    /**
     * @param mixed $alias
     */
    public function setAlias($alias): void
    {
        $this->alias = $alias;
    }


    /**
     * @return mixed
     */
    public function getJoinType()
    {
        return $this->join_type;
    }

    /**
     * @param mixed $join_type
     */
    public function setJoinType($join_type): void
    {
        $this->join_type = $join_type;
    }

    /**
     * @return string
     */
    public function getCondition(): string
    {
        return $this->condition;
    }
}